package com.financing.platform.service.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpFaTotalDao;
import com.financing.platform.dto.FpFaTotalDTO;
import com.financing.platform.service.IFpFaTotalService;
/**
 * fp_fa_total  
 *  业务访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaTotalService")
public class FpFaTotalServiceImpl implements IFpFaTotalService{

	@Autowired
	private IFpFaTotalDao fpFaTotalDao;

	@Override
	public int insert(FpFaTotalDTO fpFaTotal) throws SQLException {
		return fpFaTotalDao.insert(fpFaTotal);
	}

	@Override
	public void update(FpFaTotalDTO fpFaTotal) throws SQLException {
		fpFaTotalDao.update(fpFaTotal);
	}

	@Override
	public void updateForce(FpFaTotalDTO fpFaTotal) throws SQLException {
		fpFaTotalDao.updateForce(fpFaTotal);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		fpFaTotalDao.delete(id);
	}
	
	@Override
	public List<FpFaTotalDTO> queryList(FpFaTotalDTO fpFaTotal) throws SQLException {
		return fpFaTotalDao.queryList(fpFaTotal);
	}

	@Override
	public int queryListCount(FpFaTotalDTO fpFaTotal) throws SQLException {
		return fpFaTotalDao.queryListCount(fpFaTotal);
	}

	@Override
	public FpFaTotalDTO loadById(Integer id) throws SQLException {
		return fpFaTotalDao.loadById(id);
	}
 	@Override
	public FpFaTotalDTO queryListGetFirst(FpFaTotalDTO fpFaTotal)
			throws SQLException {
		 List<FpFaTotalDTO> queryList = queryList(fpFaTotal);
		 if(queryList==null||queryList.size()==0){
			 return new FpFaTotalDTO();
		 }
		 return queryList.get(0);
	}
}
